When it is said that someone lost his head, it means that he lost his reason, the trial, he went crazy. Normally this expression is used figuratively.